package com.chenqi.community.service.Impl;

import com.chenqi.community.dao.TypeDao;
import com.chenqi.community.entity.Type;
import com.chenqi.community.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Ardai
 */
@Service
@Transactional(rollbackFor = {RuntimeException.class})
public class TypeServiceImpl  implements TypeService {

    @Autowired
    private TypeDao typeDao;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
    public List<Type> findAllType() {
        return typeDao.findAllType();
    }
}
